import request from '@/utils/request'

// 查询老人信息列表
export function listElderly (query) {
  return request({
    url: '/community/elderly/list',
    method: 'get',
    params: query
  })
}

// 查询老人信息详细
export function getElderly (elderlyid) {
  return request({
    url: '/community/elderly/' + elderlyid,
    method: 'get'
  })
}

// 新增老人信息
export function addElderly (data) {
  return request({
    url: '/community/elderly',
    method: 'post',
    data: data
  })
}

// 修改老人信息
export function updateElderly (data) {
  return request({
    url: '/community/elderly',
    method: 'put',
    data: data
  })
}

// 删除老人信息
export function delElderly (elderlyid) {
  return request({
    url: '/community/elderly/' + elderlyid,
    method: 'delete'
  })
}

// 导出老人信息
export function exportElderly (query) {
  return request({
    url: '/community/elderly/export',
    method: 'get',
    params: query
  })
}
// 图表信息
export function getElderlyChart (query) {
  return request({
    url: '/community/elderly/elderlyChart',
    method: 'get',
    params: query
  })
}
